<template>
  <section class="informlist">
    <div v-for="(list,index) in informlistData" :key="index">
      <span>{{list.txetA}}</span>
      <span>{{list.txetB}}</span>
    </div>
    <div class="moreload" @click="moreloadEvent" v-show="informlistData.length!==0">
      <span>加载更多</span>
    </div>
  </section>
</template>

<script>
export default {
  props: {
    ident: {
      type: Number,
      required: true
    }
  },
  data () {
    return {
      informlistData: [{ txetA: '【深圳宝能太古的订单DH-20190330-000001状态已更新】', txetB: '2019-05-27 16:27' },
        { txetA: '【深圳宝能太古的订单DH-20190330-000001状态已更新】', txetB: '2019-05-27 16:27' },
        { txetA: '【深圳宝能太古的订单DH-20190330-000001状态已更新】', txetB: '2019-05-27 16:27' },
        { txetA: '【深圳宝能太古的订单DH-20190330-000001状态已更新】', txetB: '2019-05-27 16:27' },
        { txetA: '【深圳宝能太古的订单DH-20190330-000001状态已更新】', txetB: '2019-05-27 16:27' },
        { txetA: '【深圳宝能太古的订单DH-20190330-000001状态已更新】', txetB: '2019-05-27 16:27' },
        { txetA: '【深圳宝能太古的订单DH-20190330-000001状态已更新】', txetB: '2019-05-27 16:27' },
        { txetA: '【深圳宝能太古的订单DH-20190330-000001状态已更新】', txetB: '2019-05-27 16:27' },
        { txetA: '【深圳宝能太古的订单DH-20190330-000001状态已更新】', txetB: '2019-05-27 16:27' },
        { txetA: '【深圳宝能太古的订单DH-20190330-000001状态已更新】', txetB: '2019-05-27 16:27' }]
    }
  },
  watch: {
    ident () {
      this.identList()
    }
  },
  methods: {
    identList () {
      // console.log(this.ident)
    },
    moreloadEvent () {
      // axios获取数据
      var informlistDataS = this.informlistData
      informlistDataS.push({ txetA: '【真帅】', txetB: '2019-05-27 16:27' })
      this.informlistData = informlistDataS
    }
  }
}
</script>

<style lang="scss" scoped>
.informlist {
  width: 100%;
  height: 392px;
  overflow-y: scroll;
}
/*滚动条样式*/
.informlist::-webkit-scrollbar {
  width: 6px;
  /*height: 4px;*/
}
//滚动部分
.informlist::-webkit-scrollbar-thumb {
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  background: rgba(195, 195, 195, 1);
}
//总体部分
.informlist::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 0;
  background: rgba(195, 195, 195, 0.1);
}
.informlist > div {
  padding: 12px 16px;
  height: 45px;
  border-bottom: 1px solid #e3e3e3;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: flex-start;
}
.informlist > div > span:nth-child(1) {
  color: #666666;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1; /* 省略号在第几行 */
  -webkit-box-orient: vertical;
}
.informlist > div > span:nth-child(2) {
  color: #999999;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1; /* 省略号在第几行 */
  -webkit-box-orient: vertical;
}
.moreload {
  color: #999999;
  font-size: 12px;
  display: flex;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
}
</style>
